import { createApp } from 'vue'
import ElementPlus from 'element-plus'

import App from './App.vue'
import { router } from './router'
import * as ElementPlusIconsVue from '@element-plus/icons-vue'// 引入icon图标
import store from './store' // 引入store
import './permission' // 动画css
import 'element-plus/dist/index.css'
import 'nprogress/nprogress.css'
import 'virtual:windi.css'
import 'animate.css'
import permission from '~/directives/permission.js'
import 'default-passive-events'

//  创建并挂载根实例
const app = createApp(App) // 引入权限设置

app.use(router)
app.use(ElementPlus)
app.use(store)

for (const [key, component] of Object.entries(ElementPlusIconsVue)) {
  app.component(key, component)
}
app.use(permission)

app.mount('#app')
